package prog.view;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/*
 * VideoExtensionPanel.java
 *
 * Created on Jan 8, 2011, 8:10:52 PM
 */

/**
 *
 * @author MrKhoai
 */
public class VideoExtensionPanel extends javax.swing.JPanel {

    /** Creates new form VideoExtensionPanel */
    public VideoExtensionPanel() {
        initComponents();
        addListenner();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel3 = jPanel3 = new javax.swing.JPanel() {
            @Override
            public void paint(Graphics g) {
                Graphics2D graph=(Graphics2D)g;
                Image img = Toolkit.getDefaultToolkit().getImage("resource/tool/projectproperty.jpg");
                graph.drawImage(img, 0, 0, this);
                super.paint(g);
            }
        };
        jPanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jPanel2 = new javax.swing.JPanel();
        cb_item0 = new javax.swing.JCheckBox();
        cb_item1 = new javax.swing.JCheckBox();
        cb_item2 = new javax.swing.JCheckBox();
        cb_item3 = new javax.swing.JCheckBox();
        cb_item4 = new javax.swing.JCheckBox();
        cb_item5 = new javax.swing.JCheckBox();
        cb_item6 = new javax.swing.JCheckBox();
        cb_item7 = new javax.swing.JCheckBox();
        cb_item8 = new javax.swing.JCheckBox();
        cb_item9 = new javax.swing.JCheckBox();
        cb_item10 = new javax.swing.JCheckBox();
        cb_item11 = new javax.swing.JCheckBox();
        cb_item12 = new javax.swing.JCheckBox();
        cb_item13 = new javax.swing.JCheckBox();
        cb_item14 = new javax.swing.JCheckBox();
        cb_item15 = new javax.swing.JCheckBox();
        cb_item16 = new javax.swing.JCheckBox();
        cb_item17 = new javax.swing.JCheckBox();
        cb_item18 = new javax.swing.JCheckBox();
        cb_item19 = new javax.swing.JCheckBox();
        jButton1 = new javax.swing.JButton();
        jTextField1 = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        bt_selectAll = new javax.swing.JButton();
        bt_unselectAll = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        jPanel3.setOpaque(false);

        jScrollPane2.setDoubleBuffered(true);
        jScrollPane2.setMinimumSize(new java.awt.Dimension(23, 6));
        jScrollPane2.setOpaque(false);

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));
        jPanel2.setPreferredSize(new java.awt.Dimension(134, 300));

        cb_item0.setSelected(true);
        cb_item0.setText("ani");
        cb_item0.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item0.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item0.setOpaque(false);
        cb_item0.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item1.setSelected(true);
        cb_item1.setText("asf");
        cb_item1.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item1.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item1.setOpaque(false);
        cb_item1.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item2.setSelected(true);
        cb_item2.setText("asx");
        cb_item2.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item2.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item2.setOpaque(false);
        cb_item2.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item3.setSelected(true);
        cb_item3.setText("avi");
        cb_item3.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item3.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item3.setOpaque(false);
        cb_item3.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item4.setSelected(true);
        cb_item4.setText("flc");
        cb_item4.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item4.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item4.setOpaque(false);
        cb_item4.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item5.setSelected(true);
        cb_item5.setText("fli");
        cb_item5.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item5.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item5.setOpaque(false);
        cb_item5.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item6.setSelected(true);
        cb_item6.setText("flv");
        cb_item6.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item6.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item6.setOpaque(false);
        cb_item6.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item7.setSelected(true);
        cb_item7.setText("m1v");
        cb_item7.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item7.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item7.setOpaque(false);
        cb_item7.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item8.setSelected(true);
        cb_item8.setText("m2v");
        cb_item8.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item8.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item8.setOpaque(false);
        cb_item8.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item9.setSelected(true);
        cb_item9.setText("mov");
        cb_item9.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item9.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item9.setOpaque(false);
        cb_item9.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item10.setSelected(true);
        cb_item10.setText("mp4");
        cb_item10.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item10.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item10.setOpaque(false);
        cb_item10.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item11.setSelected(true);
        cb_item11.setText("mpeg");
        cb_item11.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item11.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item11.setOpaque(false);
        cb_item11.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item12.setSelected(true);
        cb_item12.setText("mpg");
        cb_item12.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item12.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item12.setOpaque(false);
        cb_item12.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item13.setSelected(true);
        cb_item13.setText("ram");
        cb_item13.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item13.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item13.setOpaque(false);
        cb_item13.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item14.setSelected(true);
        cb_item14.setText("rm");
        cb_item14.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item14.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item14.setOpaque(false);
        cb_item14.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item15.setSelected(true);
        cb_item15.setText("rv");
        cb_item15.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item15.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item15.setOpaque(false);
        cb_item15.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item16.setSelected(true);
        cb_item16.setText("smil");
        cb_item16.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item16.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item16.setOpaque(false);
        cb_item16.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item17.setSelected(true);
        cb_item17.setText("viv");
        cb_item17.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item17.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item17.setOpaque(false);
        cb_item17.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item18.setSelected(true);
        cb_item18.setText("vob");
        cb_item18.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item18.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item18.setOpaque(false);
        cb_item18.setPreferredSize(new java.awt.Dimension(43, 15));

        cb_item19.setSelected(true);
        cb_item19.setText("wmv");
        cb_item19.setMaximumSize(new java.awt.Dimension(43, 15));
        cb_item19.setMinimumSize(new java.awt.Dimension(43, 15));
        cb_item19.setOpaque(false);
        cb_item19.setPreferredSize(new java.awt.Dimension(43, 15));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(cb_item17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item15, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cb_item0, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)
                        .addComponent(cb_item14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(cb_item18, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(cb_item19, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(cb_item0, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cb_item18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(cb_item19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jScrollPane2.setViewportView(jPanel2);

        jButton1.setText("<<    Thêm");
        jButton1.setEnabled(false);

        jTextField1.setEnabled(false);

        jButton2.setText(">>    Xóa");
        jButton2.setEnabled(false);

        bt_selectAll.setText("Chọn tất cả");
        bt_selectAll.setActionCommand("selectAll");

        bt_unselectAll.setText("Bỏ tất cả");
        bt_unselectAll.setActionCommand("unselectAll");

        jLabel1.setBackground(new java.awt.Color(153, 204, 255));
        jLabel1.setText("Chọn file extension");
        jLabel1.setOpaque(true);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(bt_unselectAll, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jSeparator1)
                        .addComponent(jTextField1)
                        .addComponent(bt_selectAll, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton1))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addContainerGap(325, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(62, 62, 62)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jButton1)
                    .addGap(18, 18, 18)
                    .addComponent(jButton2)
                    .addGap(30, 30, 30)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(bt_selectAll)
                    .addGap(18, 18, 18)
                    .addComponent(bt_unselectAll)
                    .addContainerGap())
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap(37, Short.MAX_VALUE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(163, 163, 163)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(46, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(33, Short.MAX_VALUE)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 460, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 394, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    public void uncheckAll() {
        cb_item0.setSelected(false);
        cb_item1.setSelected(false);
        cb_item2.setSelected(false);
        cb_item3.setSelected(false);
        cb_item4.setSelected(false);
        cb_item5.setSelected(false);
        cb_item6.setSelected(false);
        cb_item7.setSelected(false);
        cb_item8.setSelected(false);
        cb_item9.setSelected(false);
        cb_item10.setSelected(false);
        cb_item11.setSelected(false);
        cb_item12.setSelected(false);
        cb_item13.setSelected(false);
        cb_item14.setSelected(false);
        cb_item15.setSelected(false);
        cb_item16.setSelected(false);
        cb_item17.setSelected(false);
        cb_item18.setSelected(false);
        cb_item19.setSelected(false);
    }

    public void checkAll() {
        cb_item0.setSelected(true);
        cb_item1.setSelected(true);
        cb_item2.setSelected(true);
        cb_item3.setSelected(true);
        cb_item4.setSelected(true);
        cb_item5.setSelected(true);
        cb_item6.setSelected(true);
        cb_item7.setSelected(true);
        cb_item8.setSelected(true);
        cb_item9.setSelected(true);
        cb_item10.setSelected(true);
        cb_item11.setSelected(true);
        cb_item12.setSelected(true);
        cb_item13.setSelected(true);
        cb_item14.setSelected(true);
        cb_item15.setSelected(true);
        cb_item16.setSelected(true);
        cb_item17.setSelected(true);
        cb_item18.setSelected(true);
        cb_item19.setSelected(true);
    }

    private void addListenner() {
        MyListenner listenner = new MyListenner();
        bt_selectAll.addActionListener(listenner);
        bt_unselectAll.addActionListener(listenner);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton bt_selectAll;
    private javax.swing.JButton bt_unselectAll;
    private javax.swing.JCheckBox cb_item0;
    private javax.swing.JCheckBox cb_item1;
    private javax.swing.JCheckBox cb_item10;
    private javax.swing.JCheckBox cb_item11;
    private javax.swing.JCheckBox cb_item12;
    private javax.swing.JCheckBox cb_item13;
    private javax.swing.JCheckBox cb_item14;
    private javax.swing.JCheckBox cb_item15;
    private javax.swing.JCheckBox cb_item16;
    private javax.swing.JCheckBox cb_item17;
    private javax.swing.JCheckBox cb_item18;
    private javax.swing.JCheckBox cb_item19;
    private javax.swing.JCheckBox cb_item2;
    private javax.swing.JCheckBox cb_item3;
    private javax.swing.JCheckBox cb_item4;
    private javax.swing.JCheckBox cb_item5;
    private javax.swing.JCheckBox cb_item6;
    private javax.swing.JCheckBox cb_item7;
    private javax.swing.JCheckBox cb_item8;
    private javax.swing.JCheckBox cb_item9;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTextField jTextField1;
    // End of variables declaration//GEN-END:variables

    private class MyListenner implements ActionListener {

        public void actionPerformed(ActionEvent e) {
            String actionCommand = e.getActionCommand();
            if(actionCommand.equals("selectAll")) {
                checkAll();
            }
            if(actionCommand.equals("unselectAll")) {
                uncheckAll();
            }
        }

    }
}
